package us.gaaoc.framework.webapp.backingbeans.agent.reports;

import java.util.List;

import javax.faces.context.FacesContext;

import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.transaction.annotation.Transactional;

import us.gaaoc.framework.model.CaseRecord;
import us.gaaoc.framework.model.util.CaseRecordsCountPerMonth;
import us.gaaoc.framework.webapp.backingbeans.BaseBackingBean;

public class CaseStatisticsByMonth extends BaseBackingBean {

	/** Generated Serial Version UID */
	private static final long serialVersionUID = 1644832985035494236L;
	@SuppressWarnings("unused")
	private CaseRecordsCountPerMonth numberOfCasesByMonth;

	public List<CaseRecordsCountPerMonth> getNumberOfCasesByMonth() {
		List<CaseRecordsCountPerMonth> monthList = this.getModelFacade()
				.countCasesByMonth(
						(String) FacesContext.getCurrentInstance()
								.getExternalContext().getSessionMap().get(
										"courtUuid"));
		return monthList;
	}

	public void setNumberOfCasesByMonth(List<CaseRecord> numberOfCasesByMonth) {
		this.numberOfCasesByMonth = (CaseRecordsCountPerMonth) numberOfCasesByMonth;
	}

	public String back() {
		return "back";
	}

}
